Document accessible roles for stacks and notebooks
authorMatthias Clasen <mclasen@redhat.com>
Thu, 15 Oct 2020 02:27:09 +0000 (22:27 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 15 Oct 2020 02:27:09 +0000 (22:27 -0400)
This was forgotten when I implemented the Tabs pattern.

docs/reference/gtk/section-accessibility.md
gtk/gtkenums.h
gtk/gtknotebook.c
gtk/gtkstack.c
gtk/gtkstackswitcher.c

index 37309df83b254abb710f60664a1f22da48a879c9..d60713c39485e980e85f5f6d0ea6fd1637c76ad2 100644 (file)
@@ -63,6 +63,9 @@ Each role name is part of the #GtkAccessibleRole enumeration.
 | `SEPARATOR` | A divider that separates sections of content or groups of items | #GtkSeparator |
 | `SPIN_BUTTON` | A range control that allows seelcting among discrete choices | #GtkSpinButton |
 | `SWITCH` | A control that represents on/off values | #GtkSwitch |
+| `TAB` | A tab in a list of tabs for switching pages | #GtkStackSwitcher, #GtkNotebook |
+| `TAB_LIST` | A list of tabs for switching pages | #GtkStackSwitcher, #GtkNotebook |
+| `TAB_PANEL` | A page in a notebook or stack | #GtkStack |
 | `TEXT_BOX` | A type of input that allows free-form text as its value. | #GtkEntry, #GtkPasswordEntry, #GtkTextView |
 | `WINDOW` | An application window | #GtkWindow |
 | `...` | … |
index 4aa4b8b4e6f151924a0a3d05c81f50941c90fc2c..d4495da91d341bbfe4f6b80d759320d7d30e99fe 100644 (file)
@@ -1232,10 +1232,10 @@ typedef enum {
  * @GTK_ACCESSIBLE_ROLE_STRUCTURE: Unused
  * @GTK_ACCESSIBLE_ROLE_SWITCH: A type of checkbox that represents on/off values,
  *    as opposed to checked/unchecked values.
- * @GTK_ACCESSIBLE_ROLE_TAB: Unused
+ * @GTK_ACCESSIBLE_ROLE_TAB: An item in a list of tab used for switching pages.
  * @GTK_ACCESSIBLE_ROLE_TABLE: Unused
- * @GTK_ACCESSIBLE_ROLE_TAB_LIST: Unused
- * @GTK_ACCESSIBLE_ROLE_TAB_PANEL: Unused
+ * @GTK_ACCESSIBLE_ROLE_TAB_LIST: A list of tabs for switching pages.
+ * @GTK_ACCESSIBLE_ROLE_TAB_PANEL: A page in a notebook or stack.
  * @GTK_ACCESSIBLE_ROLE_TEXT_BOX: A type of input that allows free-form text
  *    as its value.
  * @GTK_ACCESSIBLE_ROLE_TIME: Unused
index 116e7d54d9296d79a77babe1a646f8fd8ac99384..81346060c1b116de44f6fa9e40f7c66e1096b2df 100644 (file)
  * A tab node gets the .dnd style class while it is moved with drag-and-drop.
  *
  * The nodes are always arranged from left-to-right, regardless of text direction.
+ *
+ * # Accessibility
+ *
+ * GtkNotebook uses the #GTK_ACCESSIBLE_ROLE_TAB_LIST and
+ * #GTK_ACCESSIBLE_ROLE_TAB roles for its list of tabs and the
+ * #GTK_ACCESSIBLE_ROLE_TAB_PANEL for the pages.
  */
 
 
index 2c9b53bd077fe5d8fa5abeb4ea25bcbf37455fea..a9a0902c23bc7688d9da25c337cfb011351e7aaf 100644 (file)
  * # CSS nodes
  *
  * GtkStack has a single CSS node named stack.
+ *
+ * # Accessibility
+ *
+ * GtkStack uses the #GTK_ACCESSIBLE_ROLE_TAB_PANEL for the stack
+ * pages.
  */
 
 /**
index 4392cc9cdb7b4ca74d4896685337bcb1bfb0d5f6..fe6976b762c83a8c7c7e5a93ca92b5b23782eb05 100644 (file)
  * When circumstances require it, GtkStackSwitcher adds the
  * .needs-attention style class to the widgets representing the
  * stack pages.
+ *
+ * # Accessibility
+ *
+ * GtkStackSwitcher uses the #GTK_ACCESSIBLE_ROLE_TAB_LIST role
+ * and uses the #GTK_ACCESSIBLE_ROLE_TAB for its buttons.
  */
 
 #define TIMEOUT_EXPAND 500